package erfgame.core.graphics.renderer;

import erfgame.core.entity.State;

public class StatefulEntityRendererState {
	private Object animationIndex;
	private State entityState;
	
	public StatefulEntityRendererState( Object animationIndex, State entityState ) {
		this.animationIndex = animationIndex;
		this.entityState = entityState;
	}

	@Override
	public boolean equals(Object o) {
		if( o != null && o.getClass().equals( this.getClass() ) ) {
			return equals( (StatefulEntityRendererState)o );
		} else {
			return false;
		}
	}

	public boolean equals( StatefulEntityRendererState o ) {
		return o.animationIndex.equals(this.animationIndex) && o.entityState.equals( this.entityState );
	}
	
	@Override
	public int hashCode() {
		return entityState.hashCode() + animationIndex.hashCode();
	}
}
